$(document).ready(function(){
	
	$('.views-admin-links').css('display','none');
	$("a.directory-browse-by-letter-link").click(function() {
			return false;  
	});
	
	$("a.directory-browse-by-letter-link").css('color','#ccc').css('cursor','text').css('border','1px solid #ccc');
	
	$(".directory-page-name").each(function (i) {
			var $directoryLastNameLetter = $(this).attr('class');
			$(this).addClass('directory-page-name-' + $directoryLastNameLetter.charAt(40));
			$("#directory-browse-by-letter-"+$directoryLastNameLetter.charAt(40)).css('color','#ff660a').css('cursor','pointer').css('border','1px solid #333').click(function() {
					var $selectorString = 'directory-page-name-' + $directoryLastNameLetter.charAt(40);
					$('.directory-page-name').parent().parent().parent().parent().hide();
					$('.directory-page-name-' + $directoryLastNameLetter.charAt(40)).parent().parent().parent().parent().show();
			});
			$("#directory-browse-by-letter-all").css('color','#ff660a').css('cursor','pointer').css('border','1px solid #333').click(function() {
					$('.directory-page-name').parent().parent().parent().parent().show();	
			});	
	});
	
	
	//$('#main-content').prepend('<div id="f_filter-container"><form><input id="f_filter" type="text" title="Directory Quick Search" maxlength="250" alt="Directory Quick Search" class="default-text"/></form></div>');
	//$('#f_filter-container').css('float', 'right').css('display', 'inline');
	
	//remove the initial text from the RIT search
	$("#f_filter").focus(function(srcc) {
      if ($(this).val() == $(this)[0].title)
      {
          $(this).removeClass("default-text-active");
          $(this).val("");
      }
  });
  $("#f_filter").blur(function() {
      if ($(this).val() == "")
      {
          $(this).addClass("default-text-active");
          $(this).val($(this)[0].title);
      }
  });
  $("#f_filter").blur();       
	
	/*
	var kTimer;
	function filterEmployees() {
		var fstring = $('#f_filter').val().toLowerCase();
		if ( fstring.length > 0 ) {
			$('.employee_container').each( function() {
				var me = $(this);
				var name = $('.emp_name',me).html().toLowerCase();
				if ( name.indexOf(fstring) < 0 ) { me.hide(); } else { me.show(); }
			});
		} else {
			$('.employee_container').show();
		}
	}
	function maybeFilterEmployees(){
		clearTimeout(kTimer);
		kTimer = setTimeout('filterEmployees()',200);
	}
	$(function(){
		if ($.browser.mozilla) {
			$('#f_filter').keypress(maybeFilterEmployees);
		} else {
			$('#f_filter').keydown(maybeFilterEmployees);
		}
		var ss = $('#staff_search');
		$('#page-header').append(ss);
		ss.show();
	});
*/
});